//
//  BSSStoreCertificationViewController.m
//  BSSMarket
//
//  Created by 传铎 on 2020/9/25.
//  Copyright © 2020 BSS. All rights reserved.
//

#import "BSSStoreCertificationViewController.h"
#import "BSSEnterpriseCertificationViewController.h"


@interface BSSStoreCertificationViewController ()

@end

@implementation BSSStoreCertificationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"店铺主体认证";
    [self creatUI];
}
- (void)creatUI{//BSSStoreCertification_right//BSSStoreCertification_enterprise
    UIView *diView = [[UIView alloc]init];
    [self.view addSubview:diView];
    diView.backgroundColor = colorCode(@"#FFF8EB");
    [diView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(__kNavigationBarHeight__);
        make.left.mas_equalTo(0);
        make.right.mas_equalTo(0);
        make.height.mas_equalTo(72);
    }];
    
    UILabel *titleL = [[UILabel alloc]init];
    titleL.textColor = colorCode(@"#666666");
    titleL.font = fontCount(15);
    titleL.text = @"提现申请前，请先完成店铺信息认证\n\n请按真实经营情况慎重选择店铺类型";
    titleL.numberOfLines = 0;
    titleL.textAlignment = NSTextAlignmentCenter;
    [diView addSubview:titleL];
    
    [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.and.bottom.mas_equalTo(0);
    }];
    
    UIImageView *rightImageV = [[UIImageView alloc]init];
    [self.view addSubview:rightImageV];
    rightImageV.image = imageNameStr(@"BSSStoreCertification_right");
    
    [rightImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(diView.mas_bottom).offset(30);
        make.left.mas_equalTo(16);
        make.width.mas_equalTo(24);
        make.height.mas_equalTo(24);
    }];
    
    UILabel *rightL = [[UILabel alloc]init];
    rightL.font = [UIFont boldSystemFontOfSize:16];
    rightL.textColor = colorCode(@"333333");
    rightL.text = @"个体工商户";
    [self.view addSubview:rightL];
    
    [rightL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(rightImageV.mas_centerY);
        make.left.mas_equalTo(rightImageV.mas_right).offset(10);
    }];
    
    UILabel *rightDetailL = [[UILabel alloc]init];
    [self.view addSubview:rightDetailL];
    rightDetailL.text = @"适合营业执照名称或类型包含个体工商户、个人独资企业的公司";
    rightDetailL.textColor = colorCode(@"#666666");
    rightDetailL.font = fontCount(15);
    rightDetailL.numberOfLines = 0;
    
    [rightDetailL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(50);
        make.top.mas_equalTo(rightImageV.mas_bottom).offset(9);
        make.width.mas_equalTo(246);
    }];
    
    UIButton *rightNextBnt = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:rightNextBnt];
    
    [rightNextBnt setImage:imageNameStr(@"market_right") forState:0];
    [rightNextBnt addTarget:self action:@selector(rightNextClick) forControlEvents:UIControlEventTouchUpInside];
    
    [rightNextBnt mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(rightImageV.mas_bottom).offset(10);
        make.right.mas_equalTo(-15);
        make.width.mas_equalTo(50);
        make.height.mas_equalTo(50);
    }];
    UIView *lineView = [[UIView alloc]init];
    lineView.backgroundColor = colorCode(@"f2f2f2");
    [self.view addSubview:lineView];
    
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(rightDetailL.mas_bottom).offset(13);
        make.left.mas_equalTo(24);
        make.right.mas_equalTo(-24);
        make.height.mas_equalTo(1);
    }];
    
    UIImageView *certificationImageV = [[UIImageView alloc]init];
    [self.view addSubview:certificationImageV];
    certificationImageV.image = imageNameStr(@"BSSStoreCertification_enterprise");
    
    [certificationImageV mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(lineView.mas_bottom).offset(10);
        make.left.mas_equalTo(16);
        make.width.mas_equalTo(24);
        make.height.mas_equalTo(24);
    }];
    
    UILabel *certificationL = [[UILabel alloc]init];
    certificationL.font = [UIFont boldSystemFontOfSize:16];
    certificationL.textColor = colorCode(@"333333");
    certificationL.text = @"企业/公司";
    [self.view addSubview:certificationL];
    
    [certificationL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(certificationImageV.mas_centerY);
        make.left.mas_equalTo(certificationImageV.mas_right).offset(10);
    }];
    
    UILabel *certificationDetailL = [[UILabel alloc]init];
    [self.view addSubview:certificationDetailL];
    certificationDetailL.text = @"适合营业执照名称或类型包含有限责任公司、股份有限公司（有限责任公司“自然独资”）";
    certificationDetailL.textColor = colorCode(@"#666666");
    certificationDetailL.font = fontCount(15);
    certificationDetailL.numberOfLines = 0;
    
    [certificationDetailL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(50);
        make.top.mas_equalTo(certificationImageV.mas_bottom).offset(9);
        make.width.mas_equalTo(270);
    }];
    
    UIButton *certificationNextBnt = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:certificationNextBnt];
    
    [certificationNextBnt setImage:imageNameStr(@"market_right") forState:0];
    [certificationNextBnt addTarget:self action:@selector(certificationNextClick) forControlEvents:UIControlEventTouchUpInside];
    
    [certificationNextBnt mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(certificationImageV.mas_bottom).offset(10);
        make.right.mas_equalTo(-15);
        make.width.mas_equalTo(50);
        make.height.mas_equalTo(50);
    }];
}
- (void)certificationNextClick{
    BSSEnterpriseCertificationViewController *vc = [[BSSEnterpriseCertificationViewController alloc]init];
    vc.enterpriseStoreId = Format(_enterpriseStoreId);
    vc.isStore = YES;
    vc.isEnterprise = YES;
    [self.navigationController pushViewController:vc animated:YES];
}
- (void)rightNextClick{
  
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
